var myCode = {
	init:function(){
        this.layuiUse();	
        this.generateCode();
	},
	layuiUse:function(){
		layui.use(['layer', 'form','jquery','flow'], function(){
        var layer = layui.layer,
            form = layui.form,
            $ = layui.$;
            let ua = navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) && ua.match(/MicroMessenger/i)[0] === 'micromessenger') {
                $('.qrcodeBox').css('height',window.screen.height-140);
            } else {
                $('.qrcodeBox').css('height',window.screen.height-40);
            }
            
        });
    },
    //生成二维码
    generateCode:function(){
        $('#qrcode').qrcode({
            render: "canvas", //也可以替换为table
            foreground: "#5C73A7",
            background: "#FFF",
            width:150,
            height:150,
            text: "http://119.23.110.54:90/html/login/register.html?invitationPhone="+GetCookie('mobile')
        });
    }
};
myCode.init();

          